#! /bin/sh
source /etc/profile
BUILD_PATH=/home/lighthouse/
SLEEP_TIME=20s
################################
MODULE=servicecall
echo "############# WILL TO START MODULE ${MODULE} #######" >> ${BUILD_PATH}/monitor-apps.log
echo "MONITOR ${MODULE} PROCCES !" >>  ${BUILD_PATH}/monitor-apps.log
ps -ef | grep ${BUILD_PATH}/${MODULE} | grep -v grep
if [ $? -ne 0 ]
then
 	echo "START ${MODULE}" >> ${BUILD_PATH}/monitor-apps.log
	cd ${BUILD_PATH}/${MODULE}/bin/
	sh startup.sh start
	
else
	echo "${MODULE}  IS RUNNIG" >> ${BUILD_PATH}/monitor-apps.log
fi


echo "ALL SUCCESS TO RUNNING" >> ${BUILD_PATH}/monitor-apps.log
exit 0
